<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>pooller</groupId>
    <artifactId>main</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.gwtproject</groupId>
                <artifactId>gwt</artifactId>
                <version>2.11.0</version>
                <type>pom</type>
                <scope>import</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.gwtproject</groupId>
                        <artifactId>gwt-servlet</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>1.0.1</version>
                <inherited>false</inherited>
                <configuration>
                    <moduleName>main</moduleName>
                    <launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-maven-plugin</artifactId>
                    <version>11.0.19</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.gwtproject</groupId>
                            <artifactId>gwt-servlet-jakarta</artifactId>
                            <version>2.11.0</version>
                        </dependency>
                        <dependency>
                            <groupId>org.postgresql</groupId>
                            <artifactId>postgresql</artifactId>
                            <version>42.6.0</version>
                        </dependency>
<!--                        <dependency>-->
<!--                            <groupId>com.atomikos</groupId>-->
<!--                            <artifactId>transactions-jta</artifactId>-->
<!--                            <version>6.0.0</version>-->
<!--                            <classifier>jakarta</classifier>-->
<!--                        </dependency>-->
                        <dependency>
                            <groupId>org.hibernate</groupId>
                            <artifactId>hibernate-c3p0</artifactId>
                            <version>6.4.4.Final</version>
                            <type>pom</type>
                        </dependency>
                        <!-- https://mvnrepository.com/artifact/jakarta.transaction/jakarta.transaction-api -->
                        <dependency>
                            <groupId>jakarta.transaction</groupId>
                            <artifactId>jakarta.transaction-api</artifactId>
                            <version>2.0.1</version>
                        </dependency>

                        <dependency>
                            <groupId>com.sun.mail</groupId>
                            <artifactId>jakarta.mail</artifactId>
                            <version>2.0.1</version>
                        </dependency>
                        <!-- https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api -->
                        <dependency>
                            <groupId>jakarta.annotation</groupId>
                            <artifactId>jakarta.annotation-api</artifactId>
                            <version>2.1.1</version>
                        </dependency>
                        <!-- https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api -->
                        <dependency>
                            <groupId>jakarta.validation</groupId>
                            <artifactId>jakarta.validation-api</artifactId>
                            <version>3.0.2</version>
                        </dependency>
                        <dependency>
                            <groupId>jakarta.persistence</groupId>
                            <artifactId>jakarta.persistence-api</artifactId>
                            <version>3.1.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>1.0.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <sourceLevel>1.8</sourceLevel>
                        <jvmArgs>
                            <jvmArg>--add-opens</jvmArg>
                            <jvmArg>java.base/java.lang=ALL-UNNAMED</jvmArg>
                        </jvmArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <modules>
        <module>main-client</module>
        <module>maker-client</module>
        <module>main-shared</module>
        <module>main-server</module>
        <module>podman</module>
        <module>landing</module>
        <module>doc</module>
    </modules>

    <repositories>
        <repository>
            <id>maven-central</id>
            <url>https://repo1.maven.org/maven2/</url>
        </repository>
        <repository>
            <id>space-maven-pooller</id>
            <url>https://maven.pkg.jetbrains.space/pooller/p/pool/maven</url>
        </repository>
        <repository>
            <id>oss-sonatype</id>
            <name>oss-sonatype</name>
            <url>https://oss.sonatype.org/content/repositories/orggwtproject-1062/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>oss-sonatype</id>
            <name>oss-sonatype</name>
            <url>https://oss.sonatype.org/content/repositories/orggwtproject-1062/</url>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <repository>
            <id>space-maven-pooller</id>
            <url>https://maven.pkg.jetbrains.space/pooller/p/pool/maven</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>env-prod</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>net.ltgt.gwt.maven</groupId>
                            <artifactId>gwt-maven-plugin</artifactId>
                            <configuration>
                                <draftCompile>false</draftCompile>
                                <optimize>9</optimize>
                                <style>OBFUSCATED</style>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>env-dev</id>
            <activation>
                <property>
                    <name>env</name>
                    <value>dev</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>net.ltgt.gwt.maven</groupId>
                            <artifactId>gwt-maven-plugin</artifactId>
                            <configuration>
                                <draftCompile>true</draftCompile>
                                <optimize>0</optimize>
                                <style>DETAILED</style>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
